package com.usian.admin.controller.v1;

import com.usian.admin.service.AdUserLoginService;
import com.usian.apis.admin.AdLoginControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
public class AdLoginController implements AdLoginControllerApi {
    @Autowired
    private AdUserLoginService adUserLoginService;

    @Override
    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdUserDto dto) {
        return adUserLoginService.login(dto);
    }
}
